package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 舱单主 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author chenzheng
 */
@Data
public class ManifestBaseVO {

    @Schema(description = "订舱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.bookingno.notblank}")
    @Length(max = 20, message = "{manifest.bookingno.length}")
    private String bookingNo;

    @Schema(description = "舱单编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.manifestno.notblank}")
    @Length(max = 20, message = "{manifest.manifestno.length}")
    private String manifestNo;

    @Schema(description = "是否确认", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{manifest.confirmstatus.notblank}")
    @Length(max = 5, message = "{manifest.confirmstatus.length}")
    private String confirmStatus;

    @Schema(description = "主舱单")
    @Length(max = 20, message = "{manifest.mastermfno.length}")
    private String masterMfNo;

    @Schema(description = "客户参考号")
    @Length(max = 50, message = "{manifest.referenceno.length}")
    private String referenceNo;

    @Schema(description = "订舱船名 line 第一段", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.bookingvessel.notblank}")
    @Length(max = 50, message = "{manifest.bookingvessel.length}")
    private String bookingVessel;

    @Schema(description = "订舱航次 line 第一段", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.bookingvoyage.notblank}")
    @Length(max = 50, message = "{manifest.bookingvoyage.length}")
    private String bookingVoyage;

    @Schema(description = "接货地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.porcode.notblank}")
    @Length(max = 5, message = "{manifest.porcode.length}")
    private String porCode;

    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.polcode.notblank}")
    @Length(max = 5, message = "{manifest.polcode.length}")
    private String polCode;

    @Schema(description = "卸货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.podcode.notblank}")
    @Length(max = 5, message = "{manifest.podcode.length}")
    private String podCode;

    @Schema(description = "目的地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.delcode.notblank}")
    @Length(max = 5, message = "{manifest.delcode.length}")
    private String delCode;

    @Schema(description = "订舱人代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.bookingparty.notblank}")
    @Length(max = 50, message = "{manifest.bookingparty.length}")
    private String bookingParty;

    @Schema(description = "箱状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{manifest.cntrstatus.notblank}")
    @Length(max = 1, message = "{manifest.cntrstatus.length}")
    private String cntrStatus;

    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.cntrowner.notblank}")
    @Length(max = 5, message = "{manifest.cntrowner.length}")
    private String cntrOwner;

    @Schema(description = "舱位代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.spaceowner.notblank}")
    @Length(max = 5, message = "{manifest.spaceowner.length}")
    private String spaceOwner;

    @Schema(description = "运输条款", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.shippingterm.notblank}")
    @Length(max = 5, message = "{manifest.shippingterm.length}")
    private String shippingTerm;

    @Schema(description = "一级代理代码")
    @Length(max = 50, message = "{manifest.topagent.length}")
    private String topAgent;

    @Schema(description = "付费条款", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.payment.notblank}")
    @Length(max = 50, message = "{manifest.payment.length}")
    private String payment;

    @Schema(description = "接货地 描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.pordesc.notblank}")
    @Length(max = 50, message = "{manifest.pordesc.length}")
    private String porDesc;

    @Schema(description = "装货港 描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.poldesc.notblank}")
    @Length(max = 50, message = "{manifest.poldesc.length}")
    private String polDesc;

    @Schema(description = "卸货港 描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.poddesc.notblank}")
    @Length(max = 50, message = "{manifest.poddesc.length}")
    private String podDesc;

    @Schema(description = "目的地 描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.deldesc.notblank}")
    @Length(max = 50, message = "{manifest.deldesc.length}")
    private String delDesc;

    @Schema(description = "数据来源", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.datasource.notblank}")
    @Length(max = 20, message = "{manifest.datasource.length}")
    private String dataSource;

    @Schema(description = "路径id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20782")
    private Long routeId;
    @Schema(description = "协议号")
    private String agreementNo;

    @Schema(description = "第一个liner段的POL", requiredMode = Schema.RequiredMode.REQUIRED)
    private String currentPort;

    @Schema(description = "中转类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String transitTerm;

    /**
     * 订舱船名 非line 第一段
     */
    @Schema(description = "前程船名")
    private String preVessel;
    /**
     * 订舱航次 非line 第一段
     */
    @Schema(description = "前程航次")
    private String preVoyage;
}
